package org.mybatis.mapper.interfaces;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public abstract interface GenericMapper<T, PK>
{
  public abstract Integer insertModel(T paramT);

  public abstract Integer updateModelById(T paramT);
  
  public abstract Integer updateNULLById(T paramT);

  public abstract Integer deleteById(PK paramPK);

  public abstract Integer deleteByIds(@Param("paramPKs")PK[] paramPKs);
  
  public abstract Integer deleteByModel(T paramT);

  public abstract Integer deleteByCondition(Map<String, Object> paramMap);

  public abstract T findObjectById(PK paramPK);

  public abstract T findObjectByModel(T paramT);
  
  public abstract T findObjectByModelId(T paramT);

  public abstract List<T> findListByModel(T paramT);

  public abstract Integer countByCondition(Map<String, Object> paramMap);

  public abstract List<T> findModelsByCondition(Map<String, Object> paramMap);

  public abstract List<T> findModelsByCondition(Map<String, Object> paramMap, RowBounds paramRowBounds);
}

